package com.wwfish.cms.model;

import com.google.gwt.user.client.rpc.IsSerializable;
import com.wwfish.gwt.reflection.util.IFishDto;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: Tom
 * Date: 2010-7-30
 * Time: 10:41:45
 * To change this template use File | Settings | File Templates.
 */
public abstract class BaseDto  implements Serializable, IsSerializable , IFishDto {
    private Long id;
    private Date createTime;
    private Date updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BaseDto baseDto = (BaseDto) o;

        if (id != null ? !id.equals(baseDto.id) : baseDto.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }
}
